package com.roadjava.rbac.security;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;

public class DecryptedHttpServletRequestWrapper extends HttpServletRequestWrapper {

    private final String decryptedPassword;

    public DecryptedHttpServletRequestWrapper(HttpServletRequest request, String decryptedPassword) {
        super(request);
        this.decryptedPassword = decryptedPassword;
    }

    @Override
    public String getParameter(String name) {
        if ("pwd".equals(name)) {
            return decryptedPassword;
        }
        return super.getParameter(name);
    }

    // You might also want to override getParameterMap, getParameterValues, etc.
}
